package com.th.supcom.pds.common.client.model;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.th.supcom.pds.auditprescription.client.model.InPatientInfoModel;

public final class PatiInfoMockFactory
{
    @SuppressWarnings ("deprecation")
    public static InPatientInfoModel getInPatientInfo (final long pid)
    {
        final Map <Long, InPatientInfoModel> map = new HashMap <Long, InPatientInfoModel> ();

        final InPatientInfoModel inPatientInfo = new InPatientInfoModel ();
        final Date date = new Date ();
        date.setDate (new Date ().getDate () - 10000);
        inPatientInfo.setDeptAdmissionDate (date);
        inPatientInfo.setPatientId ("2000000854");
        inPatientInfo.setPatientName ("张三");
        inPatientInfo.setSex ("男");
        inPatientInfo.setVisisId (3155L);
        inPatientInfo.setBalance (2305.5);
        map.put (inPatientInfo.getVisisId (), inPatientInfo);

        final InPatientInfoModel inPatientInfo2 = new InPatientInfoModel ();
        final Date date1 = new Date ();
        date1.setDate (new Date ().getDate () - 8000);
        inPatientInfo2.setDeptAdmissionDate (date1);
        inPatientInfo2.setPatientId ("2000000254");
        inPatientInfo2.setPatientName ("李四");
        inPatientInfo2.setSex ("男");
        inPatientInfo2.setVisisId (3150l);
        inPatientInfo2.setBalance (3576.2);
        map.put (inPatientInfo2.getVisisId (), inPatientInfo2);
        if (map.containsKey (pid))
        {
            return map.get (pid);
        }
        return null;
    }

    private PatiInfoMockFactory ()
    {
    }
}
